//
//  TicketTypeModel.m
//  ImGuider
//
//  Created by 王鹏宇 on 2018/1/22.
//  Copyright © 2018年 imguider. All rights reserved.
//

#import "TicketTypeModel.h"

@implementation TicketTypeModel

+ (NSDictionary *)modelCustomPropertyMapper {
    
    return @{@"ID" : @"id"};
}


- (NSString *)price {
    
    return [NSString stringWithFormat:@"%.2f",_price.floatValue / 100];
}

- (NSString *)smartPirce {
    
    NSString *price = @"";
    if ([[AppManager sharedManager].currencyCode isEqualToString:@"USD"]) {
        
        price = [NSString stringWithFormat:@"$%@",self.price];
    } else if ([[AppManager sharedManager].currencyCode isEqualToString:@"CNY"]) {
        
         price = [NSString stringWithFormat:@"¥%@",self.price];
    }
    
    if (price.length == 0) {
        price = [NSString stringWithFormat:@"¥%@",self.price];
    }
    return price;
}
@end
